// Copyright (C) Kumo inc. and its affiliates.
// Author: Jeff.li lijippy@163.com
// All rights reserved.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published
// by the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program.  If not, see <https://www.gnu.org/licenses/>.
//

#pragma once

namespace nebula::compute {

    class FunctionRegistry;

    namespace internal {

        // Built-in scalar / elementwise functions
        void register_scalar_arithmetic(FunctionRegistry *registry);

        void register_scalar_boolean(FunctionRegistry *registry);

        void register_scalar_cast(FunctionRegistry *registry);

        void register_dictionary_decode(FunctionRegistry *registry);

        void register_scalar_comparison(FunctionRegistry *registry);

        void register_scalar_if_else(FunctionRegistry *registry);

        void register_scalar_nested(FunctionRegistry *registry);

        void register_scalar_random(FunctionRegistry *registry);  // Nullary
        void register_scalar_round_arithmetic(FunctionRegistry *registry);

        void register_scalar_set_lookup(FunctionRegistry *registry);

        void register_scalar_string_ascii(FunctionRegistry *registry);

        void register_scalar_string_utf8(FunctionRegistry *registry);

        void register_scalar_temporal_binary(FunctionRegistry *registry);

        void register_scalar_temporal_unary(FunctionRegistry *registry);

        void register_scalar_validity(FunctionRegistry *registry);

        void register_scalar_options(FunctionRegistry *registry);

        // Vector functions
        void register_vector_array_sort(FunctionRegistry *registry);

        void register_vector_cumulative_sum(FunctionRegistry *registry);

        void register_vector_hash(FunctionRegistry *registry);

        void register_vector_nested(FunctionRegistry *registry);

        void register_vector_rank(FunctionRegistry *registry);

        void RegisterVectorReplace(FunctionRegistry *registry);

        void register_vector_select_k(FunctionRegistry *registry);

        void register_vector_selection(FunctionRegistry *registry);

        void register_vector_sort(FunctionRegistry *registry);

        void register_vector_run_end_encode(FunctionRegistry *registry);

        void register_vector_run_end_decode(FunctionRegistry *registry);

        void register_vector_pairwise(FunctionRegistry *registry);

        void register_vector_options(FunctionRegistry *registry);

        // Aggregate functions
        void register_hash_aggregate_basic(FunctionRegistry *registry);

        void register_scalar_aggregate_basic(FunctionRegistry *registry);

        void register_scalar_aggregate_mode(FunctionRegistry *registry);

        void register_scalar_aggregate_quantile(FunctionRegistry *registry);

        void register_scalar_aggregate_tdigest(FunctionRegistry *registry);

        void register_scalar_aggregate_variance(FunctionRegistry *registry);

        void register_aggregate_options(FunctionRegistry *registry);

    }  // namespace internal
}  // namespace nebula::compute
